{% extends "base.html" %}
{% block title %}学生列表{% endblock %}

{% block content %}
<h2 class="mb-4">学生列表</h2>

<div class="card">
    <div class="card-body">
        <table class="table table-striped table-hover">
            <thead>
                <tr>
                    <th>学号</th>
                    <th>姓名</th>
                    <th>性别</th>
                    <th>班级</th>
                    <th>操作</th>
                </tr>
            </thead>
            <tbody>
                {% for student in students %}
                <tr>
                    <td>{{ student.student_id }}</td>
                    <td>{{ student.name }}</td>
                    <td>{{ student.gender }}</td>
                    <td>{{ student.class_name }}</td>
                    <td>
                        <a href="{{ url_for('student_detail', student_id=student.id) }}" class="btn btn-sm btn-primary">查看详情</a>
                    </td>
                </tr>
                {% endfor %}
            </tbody>
        </table>
    </div>
</div>
{% endblock %}